package com.Modular.pdf_Util.examplesPDF.CheLiangDiaoDuRiZhiDengjiBiao;

import com.jfinal.core.Controller;
import com.jfinal.kit.Kv;

/**
 * 车辆调度日志登记
 */
public class CheLiangDiaoDuRiZhiDengjiBiaoControlle extends Controller {

    public void buildPdf() {
        String SYS_DanWeiDaiMa = getPara("SYS_DanWeiDaiMa");//单位代码
        try {
            String buildUrl=CheLiangDiaoDuRiZhiDengjiBiaoService.service.buildPdf(SYS_DanWeiDaiMa);

            Kv dataMap = Kv.create().set("WenJianURL",buildUrl);

            renderJson(Kv.create().set("code", 200).set("data", dataMap).set("msg", "成功"));
        }catch(Exception e){
            renderJson(Kv.create().set("code", 500).set("data", e).set("msg", "生成pdf出错"));
        }
    }
}
